package cn.eng.user.mapper;

import cn.eng.user.domain.User;
import cn.eng.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author BoBo
 * @since 2022-11-04
 */
public interface UserMapper extends BaseMapper<User> {
    /**
     * 查询phone是否已注册
     * @param phone
     * @return
     */
    User loadByphone(String phone);
    /**
     * 查询 邮箱 .用于判断是否注册过
     * @return
     */
    User loadByEmail(String email);

    /**
     * 激活邮箱 修改状态
     * @param id
     * @param i
     */
    void updateState(@Param("id") Long id, @Param("state") int i);

    User loadByLogininfoId(Long id);
}
